Skip to content

Fix: Vulnerability in Comparison of different type sizes#1001

Open
FeedehC wants to merge 1 commit into
knolleary:masterfrom
FeedehC:master
Open

Fix: Vulnerability in Comparison of different type sizes#1001
FeedehC wants to merge 1 commit into
knolleary:masterfrom
FeedehC:master

Conversation

@FeedehC

@FeedehC FeedehC commented Mar 1, 2023

Copy link
Copy Markdown

Little change in sizes of for loop iterator "i", from uint16_t to uint32_t, to avoid possible infinite loop, which depends on the value of "plength".
More information in issue: #1000

@Flole998

Flole998 commented Mar 6, 2023

Copy link
Copy Markdown

Well, now length could potentially overflow so the buffer is incorrectly filled. Also you're still mixing datatypes, an unsigned int and an uint32_t could potentially have different sizes, so I suggest to use unsigned int for the length everywhere.

hmueller01 added a commit to hmueller01/pubsubclient3 that referenced this pull request Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants